************************************************
************************************************

** Replication file for
** The correlates of discord: identity, issue alignment, and political hostility in polarized America.
** Author: Lori Bougher
** Journal: Political Behavior
** Note: Replication code for ANES 1990s panel data

************************************************
************************************************	

*** 1992-1996 ANES Panel
	
	*** use file panel1.dta file
	
	*** Scale conversion
		foreach var of varlist outgroup ingroup affpol_ pidstr_ ideo_str_ issuealign exideo2 pint polknow_ collegegrad male repvsdem {
				su `var', meanonly  
				gen std_`var'=( `var'-r(min)) / (r(max)-r(min))
			}
	
	*** Figures and Tables
		* Table A.1	
			su std_outgroup std_ingroup std_affpol_ std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow_ std_collegegrad std_male std_repvsdem [aw=weight] if pidstr>0 & pidstr<. 
		* Table A.2
			pwcorr std_outgroup std_ingroup std_affpol_ std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow_ [aw=weight] if pidstr>0 & pidstr<. 
		* Table 4
			reg D.(std_outgroup std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow ) [aw=weight], vce (cluster VCASEID) nocons
			reg D.(std_ingroup std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow ) [aw=weight], vce (cluster VCASEID) nocons
			// Fixed effects 
			xtreg std_outgroup std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow [aw=weight], vce(cluster VCASEID) fe 		
			xtreg std_ingroup std_pidstr_ std_ideo_str_ std_issuealign std_exideo2 std_pint std_polknow [aw=weight], vce(cluster VCASEID) fe		
